package com.ymtms.statisticalform.controller;

import com.ymtms.statisticalform.pojo.GoodsbillMaster;
import com.ymtms.statisticalform.service.GoodsBillMasterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;

@Controller
@CrossOrigin(allowCredentials = "true",origins = "*")
@RequestMapping("/goodsbillmaster")
public class GoodsBillMasterController {

    @Autowired
    GoodsBillMasterService goodsBillMasterService;

    /**
     * 根据货运单号查详细信息
     * @param goodsBillCode
     * @return
     */
    @RequestMapping("/selectbill")
    @ResponseBody
    public List<GoodsbillMaster> getBillByBillCode(String goodsBillCode){
        List<GoodsbillMaster> goodsbillMasters = goodsBillMasterService.getBillByBillCode(goodsBillCode);
        return goodsbillMasters;
    }

}
